<template>
  <div id="app">
    <img alt="Vue logo" src="./assets/logo.png" ref="logo">
    <Student ref="stu"></Student>
    <button @click="getElementClicked" ref="btn">点击获取标签</button>
  </div>
</template>

<script>

import Student from './components/Student'
export default {
  name: 'App',
  components: {
    Student
  },
  methods: {
    getElementClicked() {
      console.log(this.$refs.logo)
      console.log(this.$refs.stu.$data.name)
      console.log(this.$refs.btn)
    }
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
